// 秘制绿芦羹
export async function run(characters, items_key, index) {
    G.Characters.remove_item(characters["id"], items_key, index, 1);
    let task_data = G.CharactersTask.get_task_by_number(characters["id"], 10);
    if (task_data) {
        task_data["魔法"] += 5000000;
        ClientUtils.send_characters_basic_prompt(characters["id"], "#Y/你使用了秘制绿芦羹");
        //刷新任务
        G.CharactersTask.refrush_task(characters["id"]);
    } else {
        G.CharactersTask.add_task(characters["id"], 10, {
            "气血": 0,
            "气血上限": 0,
            "魔法": 5000000,
            "开始时间": Math.floor(Date.now() / 1000),
            "超时取消": false,
            "characters_id": characters["id"],
        });
        ClientUtils.send_characters_basic_prompt(characters["id"], "#Y/你使用了秘制绿芦羹");
        //刷新任务
        G.CharactersTask.refrush_task(characters["id"]);
    }
    G.EventCallback.publish_event("使用道具", [characters, items_key, index, "秘制绿芦羹"]);
}